import React from 'react'
import {toEmotion} from 'utils'
import WxChat from "./WxChat"
import '../FriendCircle/index.less'
import {connect} from 'dva'

class WxChatModal extends React.Component {

  hideModal () {
    const {dispatch} = this.props

    dispatch({
      type: 'message/hideModal'
    })
  }

  render () {
    const {...wxChatProps} = this.props

    return (
      <div className="container-discoveries">
        <WxChat modal={true} {...wxChatProps}/>
        <div className="shadow-discoveries" onClick={() => this.hideModal()}/>
      </div>
    )
  }
}

export default connect(({message}) => ({message}))(WxChatModal)
